import moment from 'moment';
// eslint-disable-next-line import/prefer-default-export
export const searchFormCfg = [
    {
        type: 'maxRangePicker',
        key: 'order_dt',
        label: '日期',
        rules: [{required: true}],
        props: {
            disabledDate(current) {
                // Can not select days after today and today
                return current && current > moment().startOf('day');
            },
            format: 'YYYY-MM-DD',
            dayRange: 30,
        }
    },
    {
        type: 'select',
        key: 'teacher_nickname',
        label: '主讲老师',
        rules: [{required: true}],
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            allowClear: true,
            mode: 'multiple',
            placeholder: '请选择主讲老师, 支持搜索',
            selectAll: true,
        }
    },
    {
        type: 'select',
        key: 'biz_number',
        label: '大班班级ID',
        rules: [{required: true}],
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            allowClear: true,
            mode: 'multiple',
            placeholder: '请选择大班班级ID, 支持搜索',
            selectAll: true,
        }
    }
];

export const dashboardIdPre = 'specialCollect';

export const selectUnitId = 'specialCollect_PartOne_select';

export const dashBoardsCfg = [
    {
        dashBoardName: 'specialCollect_PartOne',
        dashBoardId: 'specialCollect_PartOne',
        unitId: 'specialCollect_PartOne_composite'
    },
    {
        dashBoardName: 'specialCollect_PartTwo',
        dashBoardId: 'specialCollect_PartTwo',
        unitId: 'specialCollect_PartTwo_excel'
    },
    {
        dashBoardName: 'specialCollect_PartThree',
        dashBoardId: 'specialCollect_PartThree',
        unitId: 'specialCollect_PartThree_excel'
    },
];
